﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Data;
using DocumentManagement.Models;

namespace DocumentManagement.ViewsModels
{
   public class OptionDocumentViewsModel : ViewsModelBase
    {

        private QSHCEntities1 _entityModels;
        public QSHCEntities1 EntityModels
        {
            get { return _entityModels; }
            set
            {
                if (_entityModels != value)
                {
                    _entityModels = value;
                    OnPropertyChanged("EntityModels");
                }
            }
        }


        private CreateSend _myCreateSend;
        public CreateSend MyCreateSend
        {
            get { return _myCreateSend; }
            set
            {
                if (_myCreateSend != value)
                {
                    _myCreateSend = value;
                    OnPropertyChanged("MyCreateSend");
                    if (MyCreateSend != null)
                        CreateAttachedSendICV = CollectionViewSource.GetDefaultView(MyCreateSend.CreateSendAttacheds.Where(p => p.Active == true));
                }
            }
        }

        private CreateSendAttached _selectedAttached;
        public CreateSendAttached SelectedAttached
        {
            get { return _selectedAttached; }
            set
            {
                if (_selectedAttached != value)
                {
                    _selectedAttached = value;
                    OnPropertyChanged("SelectedAttached");
                }
            }
        }


        private ICollectionView _CreateAttachedSendICV;
        public ICollectionView CreateAttachedSendICV
        {
            get { return _CreateAttachedSendICV; }
            set
            {
                if (_CreateAttachedSendICV != value)
                {
                    _CreateAttachedSendICV = value;
                    OnPropertyChanged("CreateAttachedSendICV");
                }
            }
        }


        public OptionDocumentViewsModel()
        {

        }

      

  
    }
}
